package com.springmvc.service;

import com.springmvc.dao.FileMapper;
import com.springmvc.entity.File;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

/**
 * Created by 29047 on 2018/3/11.
 */
@Service
public class FileService {

    @Autowired
    private FileMapper fileMapper;

    public int deleteByPrimaryKey(Integer id){
        return fileMapper.deleteByPrimaryKey(id);
    }

    public int insert(File record){
        return fileMapper.insert(record);
    }

    public int insertSelective(File record){
        return fileMapper.insertSelective(record);
    }

    public File selectByPrimaryKey(Integer id){
        return fileMapper.selectByPrimaryKey(id);
    }

    public int updateByPrimaryKeySelective(File record){
        return fileMapper.updateByPrimaryKeySelective(record);
    }

    public int updateByPrimaryKey(File record){
        return fileMapper.updateByPrimaryKey(record);
    }

    public ArrayList<File> selectlist(){
        return fileMapper.selectlist();
    }
}
